Page({
  data:{
    houseDetail:{}
  },
  onLoad({id}){
     // 获取房屋详情
     this.getHouseDetail(id)
  },
  async getHouseDetail(id){
    if(!id) return wx.utils.toast('id不能为空')
    const houseDetail = await wx.http.get('/room/'+id)
    // 渲染数据
    this.setData({ houseDetail })
  },
  editHouse(ev) {
    wx.navigateTo({
      url: '/house_pkg/pages/form/index?id='+ev.mark.id,
    })
  },
})
